@charset "utf-8";
/*
Theme Name: Sugar
Theme URI: https://hufangyun.com
Description: Hexo themes
Version: 0.8
Author: 小猿大圣
Author URI: https://hufangyun.com
*/

/********* Global *********/

@mixin color-gradient {
  color: #21D4FD;
  background: linear-gradient(30deg, #21D4FD, #B721FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
* {
  margin:0;
  padding:0;
  border:0;
}

body {
  font-family: -apple-system,"Helvetica Neue", "Helvetica", "Arial","PingFang SC","Hiragino Sans GB","WenQuanYi Micro Hei","Microsoft Yahei",sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
  color: #333333;
}

a {
 text-decoration: none;
}

h1, h2, h3, h4, h5 {
 font-weight: 500;
 line-height: 1.2;
}

h2 {
  padding-bottom: 10px;
}

h2, h3, h4 {
  margin-top: 32px;
}

.clear {
  clear: both;
}

.left {
  float: left;
}

/*************** index *******************/

.left-aside {
  width: 256px;
  background-size: cover;
  position: fixed;
  top: 0;
  bottom: 0;
  padding: 50px 30px 80px;
  border-right: 1px solid #d9d9d9;
  box-shadow: -1px 1px 6px rgba(0,0,0,0.35);
  text-align: center;

  h2 {
    margin: 24px 0 50px;
  }

  .face-img {
    img {
      border-radius: 50%;
      height: 100px;
      width: 100px;
      transition: All ease-in-out 0.4s;
      padding: 5px;
      background: #fff;
      box-shadow: 0 0 5px #95a5a6;
      &:hover {
        transform: translate(0px,-10px);
      }
    }
  }

  .intro-word {
    p {
      margin: 12px;
      font-size: 17px;
      font-weight: 500;
    }
  }

  .sns {
    position: absolute;
    bottom: 20%;

    li {
      list-style: none;
      float: left;
      margin: 60px 10px 20px;
      img {
        width: 31px;
        transition: All ease-in-out 0.4s;

        &:hover {
          transform:rotate(360deg);
        }
      }
    }
    .tip {
      padding: 0 14px;
      position: absolute;
      background-color: #2DCB70;
      opacity: 0;
      border-radius: 7%;
      top: 105px;
      height: 35px;
      line-height: 35px;
      color: #3D3D3D;
      font-weight: bold;
      white-space: nowrap;
      transition: All ease-in-out 0.4s;
      span {
        position: absolute;
        width: 0px;
        height: 0px;
        display: block;
        top: -14px;
        left: 50%;
        margin-left: -6px;
        border: 7px solid transparent;
        border-bottom-color: #2DCB70;
      }
    }
  }
}

.right-aside {
  margin-left: 318px;
  .nav-main {
    width: 59%;
    .category {
      margin-left: -10px;
    }
  }
  .right-nav {
    padding-left: 40px;
    position: fixed;
    top: 0;
    width: 100%;
    border-bottom: 1px solid #d9d9d9;
    background-color: #fff;

    li {
      list-style: none;
      float:left;
      line-height: 40px;
      margin-right: 30px;

      a {
        color: #009800;
        font-size: 18px;
        font-weight: bold;
      }
    }
  }
}

.search {
  float: left;
  color: #717171;
  line-height: 40px;
  margin-left: 30%;
  position: relative;

  .input-search {
    margin: 8px -31px 0  0;
    border-radius: 2em;
    padding: 7px;
    border: 1px solid #cccccc;
    width: 200px;
  }

  input {
    &:focus {
      outline: none;
    }
  }

  .search-result-box {
    position: absolute;
    top: 45px;
    top: 45px;
    left: -60%;
    width: 400px;
    max-height: 400px;
    overflow-y: scroll;
    display: none;
    background: #FFFFFF;
    border-radius: 2px;
    box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);

    #search-result {
      li {
        border-top: 1px solid #dadada;
        padding: 10px 15px;
        margin-left: 0px;
        width: 370px;

        a {
          font-size: 15px;

          &:hover {
            @include color-gradient;
          }
        }

        &:first-child {
          border-top: none;
        }

        .search-enter {
          position: absolute;
          right: 26px;
        }
      }
    }
  }
}
.right-main{
  margin-top: 58px;
  padding-left: 40px;
  float:left;
}

.category {
  li {
    list-style: none;
    float: left;
    margin: 10px 0px 5px 10px;

    a {
      padding: 5px 11px;
      border: 1px solid #d9d9d9;
      border-radius: 15px;
      box-sizing: border-box;
      font-size: 13px;
      font-weight: normal;
      line-height: 1.5;
      color: #555555;

      &:hover {
        border: 1px solid #6bd95b;
      }
    }
    .active {
      background: #6bd95b;
      color: #ffffff;
      border: 1px solid #6bd95b;
    }
  }
}

.list {
  float: left;
  margin-top: 15px;
}

.item {
  width:600px;
  margin: 23px 0px;
  border-bottom: 1px dashed #d9d9d9;

  a {
    color:#555555;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.5;

    &:hover {
      @include color-gradient;
    }
  }
}

.info {
  overflow: auto;
  li {
    float:left;
    list-style: none;
    margin:8px 8px 8px 0px;
    font-size:12px;
    color:#717171;
  }
}

.current-menu-item a {
  background-color: #6bd95b;
  color:#fff;
}

/****************** hosted **********************/

.hosted {
  margin-top: 20px;
  ul {
    li {
      float: left;
      list-style: none;
      margin-right: 30px;
      a {
        width: 130px;
        display: block;
        img {
          width:100%;
        }
      }
    }
  }
}

/***************** pages ************************/
/*header top */

.navbar-header {
  position: absolute;
  top: 0;
  height: 60px;
  width: 100%;
  text-align: center;
  z-index: 999;
  background: none;
  transition: background 0.5s;

  .blog-title {
    display: none;
  }

  &.fixed-header {
    position: fixed;
    box-shadow: 0 0 3px rgba(14,14,14,0.26);
    background-color: rgba(255,255,255,0.98);
    .blog-title {
      line-height: 60px;
      font-size: 18px;
      @include color-gradient;
      display: inline-block;
    }
  }

  .face-img{
    display: none;
  }
}

.header {
  width: 100%;
  background-color: #fff;
  height: 55px;
  border-bottom: 1px solid #eef2f8;
  color: #88909a;
  font-size: 20px;

 .icon-reorder {
   position: absolute;
   top: 14px;
   left: 20px;
 }

 h1 {
  text-align: center;
  font-size: 16px;
  font-weight: normal;
  line-height: 55px;
 }

 a {
   color: #88909a;
 }

 .face {
   position: absolute;
   top: 14px;
   right: 20px;
 }
}

/* container main*/
.article-title {
  position: absolute;
  top: 0;
  width: 100%;
  padding: 100px 0 25px 0;
  text-align: center;
  h1 {
    &.title {
      color: #4d4d4d;
      font-size: 40px;
    }
  }
  .article-info {
    position: relative;
    display: inline-block;
    margin: 10px auto;
    li {
      float: left;
      list-style: none;
      margin: 8px;
      color: #666666;
      font-size: 13px;
    }
    &:after {
      content: '';
      display: block;
      clear: both;
    }
  }
}

.container {
  width: 800px;
  margin: 0 auto;
}
.article {
  padding: 0px 30px 20px 20px;
  word-break: break-word;

  h1 {
    font-size: 24px;
  }

  h2 {
    border-bottom: 1px solid #eee;
    font-size: 22px;
  }

  h3 {
    font-size: 20px;
  }

  h4 {
    font-size: 18px;
  }

  h5 {
    font-size: 16px;
  }

  h6 {
    font-size: 14px;
  }

  .title {
    word-break: break-all;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
    color: #333;
    margin: 15px auto;
  }

  p {
    margin: 22px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    text-align: justify;

    strong {
      font-weight: bold;
      color: #333333;
    }
  }

  img {
    padding: 3px;
    border: 1px solid #ddd;
    max-width: 100%;
    margin: 8px auto 8px;
    display: block;
  }

  span {
    &.img-alt {
      max-width: 80%;
      position: relative;
      left: 50%;
      transform: translateX(-50%);
      display: inline-block;
      padding: 0px 0 2px;
      border-bottom: 1px solid #d9d9d9;
      font-size: 12px;
      color: #969696;
    }
  }

  blockquote {
    padding: 10px 20px;
    margin: 20px 0;
    background-color: #F6F6F6;
    border-left: 2px solid #49be38;
    word-break: break-word;

    p {
      &:first-child {
       margin-top: 0;
      }

      &:last-child {
       margin-bottom: 0;
      }
    }
  }

  code{
    padding: 2px 4px;
    font-size: 13px;
    color: #c7254e;
    background-color: #f9f2f4;
    border-radius: 4px;
  }

  .content {
    a {
       color: #49be38;
       border-bottom: 1px solid #49be38;

       &:hover {
        color:  #c7254e;
        border-bottom: 1px solid  #c7254e;
        background: none;
       }
    }

    ol, ul {
      margin: 30px 0;
      padding-left: 20px;

      li {
        font-size: 14px;
        line-height: 1.6;
        color: #555;
        margin: 8px 0;

        &:first-child {
          margin-top: 0;
        }

        &:last-child {
          margin-bottom: 0;
        }
      }
    }

    ol {
      margin: 30px 45px;

      li {
        list-style-type: decimal;
      }
    }

    table {
      width: 100%;
      border: 1px #E6E6E6 solid;
      border-collapse: collapse;
    }

    th {
      background: #F3F3F3;
      text-align: left;
    }

    th, td {
      border: 1px solid #E6E6E6;
      padding: 5px 8px;
      word-break: normal;
    }
  }
}

.article .image-caption{
	width: 31%;
	min-width:20%;
	padding: 10px;
	text-align: center;
	border-bottom: 1px solid #d9d9d9;
	font-size: 13px;
	color: #999999;
	font-style: italic;
	line-height: 1.7;
	margin:0 auto 20px;
}

.article h4 {
	color: inherit;
	line-height: 1.8;
	text-rendering: optimizelegibility;
}
.article .content h2{
	margin-bottom:10px;
}

.content blockquote p{
	margin-bottom:0;
}
.article table {
	margin-bottom: 25px;
}

.article .support-author {
	padding: 25px;
	margin-bottom: 40px;
	background-color: whitesmoke;
	border-left: 4px solid #49be38;
	box-sizing: border-box;
	box-shadow: 0 0 1px #d9d9d9;
	margin:50px auto;
}
.article .support-author p{
	margin: 0 auto 10px;
	font-size: 17px;
	font-weight: bold;
}

.support-author .btn-pay {
	margin: 10px 15px 10px 0;
	color: white;
	border-color: #49be38;
	background-color: #49be38;
	border-radius: 4px;
	padding: 4px 12px;
	font-size: 14px;
	line-height: 20px;
	text-align: center;
}
.support-author .btn-pay:hover{
	background-color: #f57e42;
}
.like {
	width: 163px;
	height: 50px;
	line-height: 50px;
	border: 1px solid #e78170;
	border-radius: 40px;
	font-size: 18px;
	text-align: center;
	color:#e78170;
	margin:0 auto;
}
.like a {
	color:#e78170;
}
.like-button {
	position: relative;
	width: 60px;
	height: 50px;
	padding-right: 10px;
	display: inline-block;
}
.like span {
	position: relative;
	height: 20px;
	padding-left: 15px;
	border-left: 1px solid;
	cursor: pointer;
	color: #e78170;
}
.like:hover{
	background-color:#f6cec7;
	border-color:#f6cec7
}

.footer{
  background-color:#EFEFEF;
  border-top: 1px solid #d9d9d9;
  margin:10px auto 0;
  text-align: center;
  padding:80px 0 10px;
  line-height: 38px;
  .info {
    a {
      color: #333;
      &:hover {
        color: #49be38;
      }
    }
  }
}


/************** page *******************/

.container .center{
	text-align: center;
	margin-top:30px;
}
.container .f{
	float:left;
	margin:30px 60px;
}

.leftAside{
	width:60px;
	position:fixed;
	top:0px;
	bottom:0px;
	background-color:#EFEFEF;
	padding-top:30px;
	overflow-y:auto;
}
.leftAside .icon{
	font-size:21px;
	text-align: center;
}
.leftAside .hoverShow{
	display:none;
	margin-left:30px;
}
.leftAside .hoverShow a:link,.hoverShow a{
	color:#2f2f2f;
	line-height:27px;
}
.leftAside .hoverShow .titleList{
	margin-top:20px;
}
.leftAside .hoverShow .titleList ul li{
	margin-top:8px;
}
.leftAside .hoverShow .titleList .archive{
	display: none;
	width:223px;
	white-space:nowrap; /* 禁止自动换行 */
	overflow:hidden; /* 隐藏溢出的内容 */
	text-overflow:ellipsis; /* 溢出文本使用...代替 */
	-o-text-overflow: ellipsis;
}
.leftAside .hoverShow .titleList .archive li a{
	font-size:14px;
}
.leftAside .hoverShow .titleList .tabs a{
	background-color:#6666FF;
	padding:0 4px;
	color:#fff;
	border-radius:15%;
	margin:4px;
	float:left;
	font-size:13px;
}
.otherLink{
	border-bottom: 1px solid #eeeeee;
	border-top: 1px solid #eeeeee;
	padding:15px;
	height: 30px;
	color:#555555;
}
.otherLink a{
	color:#555555;
}
.otherLink a:hover{
	color:#000000;
}
.otherLink .previous{
	float:left;
}
.otherLink .next{
	float:right;
}

/******* index page nav *********/
.page-nav {
  margin: 50px auto 20px;
  font-weight: 500;
  text-decoration: none;
  a {
    &:active, &:link, &:visited, &:hover {
      color: #888888;
    }
  }
  .page-number {
    padding: 6px 12px;
    margin-left: -1px;
    border: 1px solid #dddddd;

    &.current {
      background: #15a829;
      color: #ffffff;
      padding: 7px 12px;
    }
  }
  .extend {
    padding: 6px 12px;
    border: 1px solid #dddddd;

    &.prev {
      border-bottom-left-radius: 3px;
      border-top-left-radius: 3px;
    }

    &.next {
      margin-left: -1px;
      border-bottom-right-radius: 3px;
      border-top-right-radius: 3px;
    }
  }

  .space {
    padding: 6px 7px;
    margin-left: -1px;
    border: 1px solid #ddd;
  }
}

/******** 代码高亮区 Mac装饰 *************/
.highlight-wrap[data-rel] {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  box-shadow: 0 10px 30px 0px rgba(0,0,0,0.4);
  margin: 35px 0;
  ::-webkit-scrollbar {
    height: 10px;
  }

  ::-webkit-scrollbar-track {
      -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
      border-radius: 10px;
  }

  ::-webkit-scrollbar-thumb {
      border-radius: 10px;
      -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
  }
  &::before {
    color: white;
    content: attr(data-rel);
    height: 38px;
    line-height: 38px;
    background: #21252b;
    color: #fff;
    font-size: 16px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: bold;
    padding: 0px 80px;
    text-indent: 15px;
    float: left;
  }
  &::after {
    content: " ";
    position: absolute;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    background: #fc625d;
    width: 12px;
    height: 12px;
    top: 0;
    left: 20px;
    margin-top: 13px;
    -webkit-box-shadow: 20px 0px #fdbc40, 40px 0px #35cd4b;
    box-shadow: 20px 0px #fdbc40, 40px 0px #35cd4b;
    z-index: 3;
  }
}
/**********代码高亮**********/

.article figure.highlight {
  width: 100%;
  overflow-x: auto;
  background-color: #fdf6e3;
  padding: 6px;
  margin: 13px 0;
  /* margin-top: -13px; 与标题之间没有间距 */
  font-size: 14px;
  border-radius: 5px;
  color:#657b83;
  .title {
    font-size: 14px;
  }
}
.article figure.highlight pre{
	/*white-space: pre-wrap;*/
  word-wrap: break-word;
  word-break: break-word;
}

.article figure.highlight table,
.article figure.highlight tr,
.article figure.highlight td{
	border: none;
	margin-bottom: 0;
}

.article code,
.article figure.highlight .code,
.article figure.highlight .line
{
  line-height: 2;
  //white-space: normal; 代码不能缩进
  font-family: "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace;
}

.article figure.highlight .comment,
.article figure.highlight .quote {
  color: #93a1a1;
}

/* Solarized Green */
.article figure.highlight .keyword,
.article figure.highlight .selector-tag,
.article figure.highlight .addition {
  color: #859900;
}

/* Solarized Cyan */
.article figure.highlight .number,
.article figure.highlight .string,
.article figure.highlight .meta .article figure.highlight .meta-string,
.article figure.highlight .literal,
.article figure.highlight .doctag,
.article figure.highlight .regexp {
  color: #2aa198;
}

/* Solarized Blue */
.article figure.highlight .title,
.article figure.highlight .section,
.article figure.highlight .name,
.article figure.highlight .selector-id,
.article figure.highlight .selector-class {
  color: #268bd2;
}

/* Solarized Yellow */
.article figure.highlight .attribute,
.article figure.highlight .attr,
.article figure.highlight .variable,
.article figure.highlight .template-variable,
.article figure.highlight .class .article figure.highlight .title,
.article figure.highlight .type {
  color: #b58900;
}

/* Solarized Orange */
.article figure.highlight .symbol,
.article figure.highlight .bullet,
.article figure.highlight .subst,
.article figure.highlight .meta,
.article figure.highlight .meta .article figure.highlight .keyword,
.article figure.highlight .selector-attr,
.article figure.highlight .selector-pseudo,
.article figure.highlight .link {
  color: #cb4b16;
}

/* Solarized Red */
.article figure.highlight .built_in,
.article figure.highlight .deletion {
  color: #dc322f;
}

.article figure.highlight .formula {
  background: #eee8d5;
}

.article figure.highlight .emphasis {
  font-style: italic;
}

.article figure.highlight .strong {
  font-weight: bold;
}

.article figure.highlight .gutter {
  width: 10px;
}

/********响应式**********/

@media screen and (max-width: 768px) {

/***header 左侧边栏 ****/

.left-aside {
  width: 100%;
  padding: 13px 0px 53px;
  border-right: none;
  position: static;
  background: #FFF;

  .face-img {
    img {
      height: 95px;
      width: 95px;
    }
  }

  h2 {
    margin: 7px 0 7px;
    font-size: 22px;
  }
  .sns {
    width: 216px;
    position: relative;
    margin: 0 auto;
    li {
      margin: 13px 10px 6px;
      img {
        width: 23px;
      }
    }
    .tip {
      top: 50px;
    }
  }
}
.ms {
  display:none;
}

/********** main ***********/

.right-aside {
  width: 100%;
  margin: 0 auto;
  margin-left: 0px;
  .right-main {
    .category {
      margin-left: -10px;
    }
    margin-top: 20px;
    float: none;
    padding-left: 0px;
    width: 90%;
    padding-top: 15px;
    margin: 0 auto;
  }
}
.item {
  width:100%;
}

.page-nav {
  width: 200px;
}

.hosted {
  margin: 20px auto;
}

/************ 文章页 **************/

.article-title {
  padding: 80px 0 25px 0;
  h1 {
    &.title {
      font-size: 30px;
    }
  }
}

  .container{
    width: 100%;
  }
  .leftAside{
    display: none;
  }

  .navbar-header {
    &.fixed-header {
      .face-img {
        display: block;
        margin: 0 auto;
        line-height: 80px;
        img {
          border-radius: 50%;
          height: 30px;
          width: 30px;
          transition: All ease-in-out 0.4s;
        }
      }

      .blog-title {
        display: none;
      }
    }
  }
}
